package collection;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class CollectionToArray {
    public static void main(String[] args) {
        Collection<String>c=new ArrayList<>();
        c.add("1");
        c.add("2");
        c.add("3");
        System.out.println(c);
        String[] arr=c.toArray(new String[4]);
        System.out.println(Arrays.toString(arr));
    }
}
